﻿using System;
using Internal.Runtime;
using Runtime.Models;

namespace Runtime {

    /// <summary>
    /// 数据中心
    /// </summary>
    public class DFR_CoreDataCenter: IDFR_CoreDataCenterInternal {

        /// <summary>
        /// 运行时数据
        /// </summary>
        public IDFR_CoreModels Models { get; private set; } = new DFR_CoreModels();

        void IDFR_CoreDataCenterInternal.ResetModels() {
            if (Models is IDisposable disposable) {
                disposable.Dispose();
            }
            Models = new DFR_CoreModels();
        }
    }
}

namespace Internal.Runtime {

    public interface IDFR_CoreDataCenterInternal {

        void ResetModels();
    }
}
